home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr48 / vdl020d.zip / VSHARE.DOC < prev    next >
Text File  |  1993-04-14  |  4KB  |  143 lines

  1. {
  2.  ══════════════════════════════════════════════════════════════════════════════
  3.  
  4.  Visionix DOS File-Sharing Functions Unit (VSHARE)
  5.  Copyright 1992 Visionix
  6.  ALL RIGHTS RESERVED
  7.  
  8.  ──────────────────────────────────────────────────────────────────────────────
  9.  
  10.  Revision history in reverse chronological order:
  11.  
  12.  Initials  Date      Comment
  13.  ────────  ────────  ──────────────────────────────────────────────────────────
  14.  
  15.  lpg       03/16/93  Added Source Documentation
  16.  
  17.  lpg       12/27/92  Created
  18.  
  19.  ══════════════════════════════════════════════════════════════════════════════
  20.  
  21. File-Sharing Functions Summary
  22. ------------------------------
  23.  
  24. INT 21h
  25.  
  26. Func | Sub | Name                               | Use
  27. -----+-----+------------------------------------+--------------------------------------
  28.  44h | 0Bh | Set Sharing Retry Count            | Set number of times DOS retries a file sharing operation
  29.  5Ch | 00h | Lock File                          | Denies access to specified region in file
  30.  5Ch | 01h | Unlock File                        | Allow access to specified region in file
  31. -----+-----+------------------------------------+--------------------------------------
  32.  
  33.  
  34.  
  35. NOTE: Use Function GetExtendedError to Process and Parse Error Message
  36.  
  37. }
  38.  
  39. Unit VShare;
  40.  
  41.  
  42.  
  43.   Function SetShareRetryCnt(           RetryCnt  : WORD;
  44.                                        Pause     : WORD      ) : BYTE;
  45.  
  46.   Function LockFile(               VAR FileHandle;
  47.                                        LockArea  : LONGINT;
  48.                                        LockLen   : LONGINT   ) : BYTE;
  49.  
  50.   Function UnLockFile(             VAR FileHandle;
  51.                                        LockArea  : LONGINT;
  52.                                        LockLen   : LONGINT   ) : BYTE;
  53.  
  54.  
  55.  
  56. ──────────────────────────────────────────────────────────────────────────────
  57.  
  58.  
  59. [FUNCTION]
  60.  
  61. Function SetShareRetryCnt(   RetryCnt  : WORD;
  62.                              Pause     : WORD         ) : BYTE;
  63.  
  64. [PARAMETERS]
  65.  
  66. RetryCnt    Number of Times to Retry before Fail
  67. Pause       Pause Time between Retries
  68.  
  69. [RETURNS]
  70.  
  71. Status Code (0=Success)
  72.  
  73. [DESCRIPTION]
  74.  
  75. Sets number of times DOS retries a file sharing operation.
  76.  
  77. Default is 1 Loop, 3 Retries.  Pause depends upon computer clock speed.
  78.  
  79. [SEE-ALSO]
  80.  
  81. [EXAMPLE]
  82.  
  83.  
  84. ──────────────────────────────────────────────────────────────────────────────
  85.  
  86.  
  87. [FUNCTION]
  88.  
  89. Function LockFile(       VAR FileHandle;
  90.                              LockArea  : LONGINT;
  91.                              LockLen   : LONGINT      ) : BYTE;
  92.  
  93. [PARAMETERS]
  94.  
  95. FileHandle  VAR File Handle (not typed)
  96. LockArea    Offset of Region to Lock in File
  97. LockLen     Length of Region to Lock in File
  98.  
  99. [RETURNS]
  100.  
  101. Status Code (0=Success)
  102.  
  103. [DESCRIPTION]
  104.  
  105. Denies access to specified region in file.
  106.  
  107. NOTE: File Sharing MUST be loaded before using Lock on a Local Computer
  108.  
  109. [SEE-ALSO]
  110.  
  111. [EXAMPLE]
  112.  
  113.  
  114. ──────────────────────────────────────────────────────────────────────────────
  115.  
  116.  
  117. [FUNCTION]
  118.  
  119. Function UnLockFile(     VAR FileHandle;
  120.                              LockArea  : LONGINT;
  121.                              LockLen   : LONGINT      ) : BYTE;
  122.  
  123. [PARAMETERS]
  124.  
  125. FileHandle  VAR File Handle (not typed)
  126. LockArea    Offset of Locked Region in File
  127. LockLen     Length of Locked Region in File
  128.  
  129. [RETURNS]
  130.  
  131. Status Code (0=Success)
  132.  
  133. [DESCRIPTION]
  134.  
  135. Allows access to specified region in file.
  136.  
  137. NOTE: Region Must be same one locked with LockFile Func.
  138.  
  139. [SEE-ALSO]
  140.  
  141. [EXAMPLE]
  142.  
  143.